<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ViewInGM.aspx.cs" Inherits="Instedd.Labs.Geoblogging.Website.ViewInGM" %>

<%@ Register Assembly="FreeTextBox" Namespace="FreeTextBoxControls" TagPrefix="FTB" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Untitled Page</title>
        <script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=<%= ConfigurationManager.AppSettings["GoogleMapsKey"].ToString() %>"
      type="text/javascript"></script>
</head>
<body onload="">
    <form id="form1" runat="server">
    <script type="text/javascript">

    //<![CDATA[
    var geoXml;
    function loadMap(x,y) {
    var baseIcon = new GIcon();
//baseIcon.shadow = "http://www.google.com/mapfiles/shadow50.png";
baseIcon.iconSize = new GSize(25, 25);
baseIcon.shadowSize = new GSize(37, 34);
baseIcon.iconAnchor = new GPoint(9, 34);
baseIcon.infoWindowAnchor = new GPoint(9, 2);
baseIcon.infoShadowAnchor = new GPoint(18, 25);

      if (GBrowserIsCompatible()) {
        var map = new GMap2(document.getElementById("map"));
        var custIcon = new GIcon(baseIcon);
        custIcon.image = "http://bioforms.clariusconsulting.net/img/icon_pink.png";
        // Set up our GMarkerOptions object
  //      markerOptions = { icon:custIcon };
        //point = new GLatLng(x, y);
//        var marker = new GMarker(new GLatLng(x, y), markerOptions);
        //map.addOverlay(marker);
        geoXml = new GGeoXml("http://mapgadgets.googlepages.com/cta.kml",callme);
        //geoXml = new GGeoXml("http://mapgadgets.googlepages.com/cta.kml",callme);
        //var log = new GLog();
        //map.addOverlay(geoXml);
        //map.setCenter(new GLatLng(x, y), 13);
         map.setCenter(new GLatLng(41.875696,-87.624207), 11); 
      }
    }
    function callme()
    {
            alert(geoXml.hasLoaded());
            alert(geoXml.loadedCorrectly());
    }
    </script>

    <div id="map" style="width: 400px; height: 200px; border-left-color: green; border-bottom-color: green; border-top-style: solid; border-top-color: green; border-right-style: solid; border-left-style: solid; border-right-color: green; border-bottom-style: solid;"></div>
        <br />
        <FTB:FreeTextBox ID="FreeTextBox1" runat="server" BackColor="Green" GutterBackColor="Green">
        </FTB:FreeTextBox>
        <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Button" />
    </form>
</body>
</html>
